using FireStarterModeller.BO;
using Habanero.Base;
using Habanero.BO;
using Habanero.Faces.Base;
using Habanero.Faces.Win;

namespace FireStarterModeller.UI
{
//    /// <summary>
//    /// The <see cref="IBOSelectorAndEditor"/> for editing the <see cref="DMProperty"/>s of the <see cref="DMClass"/>.
//    /// This control also contains the <see cref="DMPropRuleControl"/> for managing the <see cref="DMProperty"/>'s
//    ///   <see cref="DMPropRule"/>s
//    /// </summary>
//    public class DMPropertyAndRuleEditorControl : PanelWin, IFormControl
//    {
//        private DMClass _dmClass;
//        public IBOParentChildrenSelector PropertyEditorControl { get; private set; }
//
//        public DMPropertyAndRuleEditorControl(IControlFactory controlFactory)
//        {
//            PropertyEditorControl = new DMPropertyColEditorControl(controlFactory);
//
//            GridLayoutManager layoutManager = new GridLayoutManager(this, controlFactory);
//            layoutManager.SetGridSize(1,1);
//            layoutManager.AddControl(PropertyEditorControl);
//
//            this.Enabled = false;
//            this.Height = 390;
//            this.Width = 800;
//        }
//
//        /// <summary>
//        /// The <see cref="DMClass"/> whose <see cref="DMProperty"/>s are being edited by this control
//        /// </summary>
//        public DMClass SubClass
//        {
//            get { return _dmClass; }
//            set
//            {
//                _dmClass = value;
//                this.PropertyEditorControl.BusinessObject = _dmClass;
//                UpdateState();
//            }
//        }
//
//        private void UpdateState()
//        {
//            this.Enabled = _dmClass != null;
//        }
//
//
//        /// <summary>
//        /// The <see cref="IBusinessObjectCollection"/> of <see cref="DMProperty"/>s  being managed by this control.
//        /// </summary>
//        public BusinessObjectCollection<DMProperty> Properties
//        {
//            get
//            {
//                return
//                    (BusinessObjectCollection<DMProperty>)
//                    PropertyEditorControl.BusinessObjectCollection;
//            }
//        }
//
//        /// <summary>
//        /// The <see cref="DMProperty"/> currently selected in the Grid (i.e. currently being edited)
//        /// </summary>
//        public DMProperty Property
//        {
//            get { return (DMProperty) PropertyEditorControl.SelectedBusinessObject; }
//            set { PropertyEditorControl.SelectedBusinessObject = value; }
//        }
//
//
//        public void SetForm(IFormHabanero form)
//        {
//        }
//    }
}